package com.cari.oa.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.validator.constraints.Length;


@Entity
@Table(name = "T_NEWS")
public class NewsEntity implements Serializable{

	private static final long serialVersionUID = 4067812845915799213L;
	
	@Id
    @Length(max = 32)
    @GeneratedValue(generator = "system-uuid")
    @GenericGenerator(name = "system-uuid", strategy = "uuid")
    private String id;
	
	@NotNull(message = "标题不能为空")
    @Length(max = 200, message = "标题长度要小于200个字符")
    private String title;//标题
	
	@NotNull(message = "内容不能为空")
    private String content;//内容
	
	@NotNull(message = "创建时间不能为空")
    @Column(name = "CREATE_TIME")
    private Date createTime = new Date();//创建时间
	
	@NotNull(message = "创建用户不能为空")
    @Column(name = "CREATE_USER")
    private String createUser;//创建用户
	
	@NotNull(message = "显示类别不能为空")
    @Column(name = "SHOW_TYPE")
    private Integer showType;//显示类别：1 普通显示  2 弹窗显示

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getCreateUser() {
		return createUser;
	}

	public void setCreateUser(String createUser) {
		this.createUser = createUser;
	}

	public Integer getShowType() {
		return showType;
	}

	public void setShowType(Integer showType) {
		this.showType = showType;
	}
	
	

}
